package com.ny.until;

import org.apache.commons.codec.digest.DigestUtils;

public class PasswordUtil {
    public static String encryptPassword(String password){
        return DigestUtils.md5Hex(password);
    }
    
    public static boolean checkPassword(String rawPassword, String encodedPassword) {
        // 验证密码是否匹配
        return DigestUtils.md5Hex(rawPassword).equals(encodedPassword);
    }
}